var app = getApp();

import WxParse from '../../wxParse/wxParse.js';
import {getAgreement} from '../../api/api.js';

Component({
    properties: {
        policy: {
            type: Object,
            value: {
                isShow: false,
                isAgree: false,
                content: '',
            }
        }
    },
    data: {
        attrValue: [],
        attrIndex: 0,
        isShow: false,
    },
    attached: function() {
        if (this.data.policy.content !== '') {
            WxParse.wxParse('content', 'html', this.data.policy.content, this, 0);
        }
        console.log('this.data.policy---->', this.data.policy);
    },
    methods: {
        close: function() {
            console.log('1---->', 1);
            this.triggerEvent('onClosePolicy', 1);
        },
        agreementPolicy: function() {
            console.log('1---->', 1);
            this.triggerEvent('agreementPolicy', 1);
        },
    }
})